<template>
  <div class="">
    <div>Archive</div>
    <div>Admin:{{ admin.adminCount }}</div>
    <div>
      <el-button :loading="admin.adminLoading" @click="fakeFeatch">
        fakeFeatch
      </el-button>
    </div>
  </div>
</template>

<script lang="ts">
import { defineComponent, reactive } from "vue";
import { StoreState } from "../../store";
import { useHookStore } from "../../hooks";
import { useStore, mapActions, mapState } from "vuex";

export default defineComponent({
  name: "Archive",
  setup() {
    const store = useHookStore();
    console.log({ store });
    // const { } = store;
    const vuexStore = useStore();

    const { loading: adminLoading, adminCount } = store.state.user.admin;
    const { loading: touristLoading, touristCount } = store.state.user.tourist;

    const admin = reactive(store.state.user.admin);
    const tourist = reactive(store.state.user.tourist);

    return {
      admin,
      tourist,
      adminLoading,
      adminCount,
      touristLoading,
      touristCount,
    };
  },
  mounted() {
    console.log(this);
  },
  methods: {
    ...mapActions("admin", ["fakeFeatch"]),
  },
});
</script>

<style lang="less" scoped>
</style>